﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace Candy.Web.Data
{
    public class GenotypeDto
    {
        [Key]
        [Editable(false, AllowInitialValue = false)]
        public int Id { get; set; }

        [Editable(false, AllowInitialValue = true)]
        public int ProjectId { get; set; }

        [StringLength(3, MinimumLength = 2, ErrorMessage = "The name should be at least 2 characters long but not longer than 3 character.")]
        [RegularExpression(@"^[0-9A-Za-z]{2,3}$", ErrorMessage = "Name should only contain characters and numbers.")]
        [Required]
        public string Name { get; set; }

        [Required]
        [RegularExpression(@"^[0-9A-Za-z]{2,100}$", ErrorMessage = "Name should only contain characters and numbers and at least 2 charactes long.")]
        public string Genus { get; set; }

        public string Species { get; set; }

        public string Variety { get; set; }


    }
}